<div id="bag">
	<ul>
<?php
$_tmp = $this->getUserBag();
$_tmp = CJSON::decode($_tmp);
$str = '';
if (count($_tmp)>0){
	foreach ($_tmp as $num=>$ent){
		$str .= '<li class="dragElement" group="'.$ent['group'].'" id="bi'.$num.'"><a href="'.$ent['link'].'">'.$ent['item'].'</a><a href="#" class="removeItem">x</a></li>';
	}
}
echo $str;
?>
	</ul>
</div>